var rcds = this.getItem('grdList').getSelectionModel().getSelection();
if (Ext.isEmpty(rcds)) {
    return;
}

var me = this;
var myMask = new Ext.LoadMask(me.getItem('pnlInfo'), {
    msg: "首次打印会较慢，请耐心等待..."
});
myMask.show();

var vMsns = "";
Ext.each(rcds,
function(rcd) {
    vMsns += rcd.get('msn') + ",";
});

var mainForm = me.getItem('frmMain');
button.setDisabled(true);

YX.ZbusRpc.request({
    module: 'SmatViewMaterialSnToPrintLabelService',
    showSuccess: false,
    params: {
        msns: vMsns
    },
    success: function(rsp) {
        if (!Ext.isEmpty(rsp.fileName)) {
            Ext.create('Ext.window.Window', {
                title: '标签打印',
                height: mainForm.getHeight() - 50,
                width: mainForm.getWidth() - 200,
                layout: 'fit',
                modal: true,
                frame: false,
                items: [{
                    html: '<iframe style="width:100%;height:100%" src="export?download=0&fileName=' + rsp.fileName + '"/>'
                }]
            }).show();
        }
    },
    callback: function() {
        button.setDisabled(false);
        myMask.hide();
    }
});